package com.heu.blood.dict.service.impl;/**
 * @author lhh
 * @date 2024-07-03 20:16
 */

import com.heu.blood.common.commponent.DictBloodProductLoader;
import com.heu.blood.common.commponent.DictDeaprtmentLoader;
import com.heu.blood.common.commponent.DictionaryLoader;
import com.heu.blood.dict.entity.DictDepartmentEntity;
import com.heu.blood.dict.service.DictDataLoaderService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @author lhh
 * @date 2024-07-03 20:16
 */
@Service("dictDataLoaderService")
public class DictDataLoaderServiceImpl implements DictDataLoaderService {

    @Autowired
    DictBloodProductLoader dictBloodProductLoader;

    @Autowired
    DictDeaprtmentLoader dictDeaprtmentLoader;

    @Autowired
    DictionaryLoader dictionaryLoader;

    @Override
    public void reloadAllDictionaries(Map<String, Object> params) {
        dictDeaprtmentLoader.setDictDepartment();
        dictBloodProductLoader.setDictBloodProduct();
        dictionaryLoader.setDict();
        dictionaryLoader.setSubDict();
        dictionaryLoader.setDictValueToCode();
    }
}
